package day12;

public class demo7 {
    public static void main(String[] args) {
        System.out.println("第一类：对象类  根据地址计算");
        demo7 d1 = new demo7();
        demo7 d2 = new demo7();
        demo7 d3 = d1;
        System.out.println("d1"+d1.hashCode());
        System.out.println("d2"+d2.hashCode());
        System.out.println("d3"+d3.hashCode());
        System.out.println("第二类：基本类型封装类");
        Integer num1 = 100;
        Long num2 = 1000L;
        Integer num3 = 10000;
        System.out.println("num1:"+num1.hashCode());
        System.out.println("num2:"+num2.hashCode());
        System.out.println("num3:"+num3.hashCode());

        System.out.println("第三类:String类 根据字符串计算");
        String str1 = "abc";
        String str2 = new String("abc");
        System.out.println("str1:"+str1.hashCode());
        System.out.println("str2:"+str2.hashCode());
    }

}
